<?php
/**
 * Nordic Repository
 * 
 * LICENSE
 * 
 * The new BSD license is applied on this source-file. For further
 * information please visit http://license.nordic-dev.de/newbsd.txt
 * or send an email to andre.moelle@gmail.com.
 */

/**
 * Checks if the source-file is a tiff-image.
 * 
 * @category   Nordic
 * @package    Nordic_Upload
 * @copyright  2007 Nordic Development
 * @license    http://license.nordic-dev.de/newbsd.txt (New-BSD license)
 * @author     Andre Moelle <andre.moelle@gmail.com>
 * @version    $Id: Tiff.php 3 2007-07-08 09:21:42Z andre.moelle $
 */
class Nordic_Upload_Filter_Tiff extends Nordic_Upload_Filter_Sample
{
	/**
	 * @see Nordic_Upload_Filter_Interface::getExtension()
	 */
	public function getExtension ()
	{
		return 'tiff';
	}
	
	/**
	 * @see Nordic_Upload_Filter_Interface::process()
	 */
	public function process ()
	{
		$type = exif_imagetype($this->_source);
		
		return (   $type == IMAGETYPE_TIFF_MM
				|| $type == IMAGETYPE_TIFF_II
		);
	}
}
?>